1. Field of the Invention
The present invention relates to graphics in a display unit. More specifically, the invention relates to a method of drawing figures in a multi-window system in which a plurality of rectangular regions called windows are set on a display screen of a display unit of the raster scanning type, the figures being drawn on a window that is partially covered with other windows and that partly forms a non-display region.
2. Description of the Prior Art
In a computer graphics display system, a method has heretofore been employed to clip a figure on a drawing region in order to display a figure of a size in excess of the size of the display screen or to produce a drawing output for a particular region that is set on a portion of the display screen. According to a representative method of drawing figures as disclosed, for example, in Japanese Patent Laid-Open No. 225473/1983, a portion included in a drawing region in the whole figure is judged based upon an equation that mathematically expresses the figure to be drawn, and the output is sent to the display device according to the judged result.
The advantage of this method is that when a straight line passing through points A and B is to be described in a particular drawing region on the display screen, a start point and an end point on the drawing region through which a straight line passes should be calculated from an equation of the straight line. Thereafter, using a dot generator, dots on a segment connecting the start point and the end point are generated and are produced onto the display screen.
However, the above-mentioned conventional drawing method has problems as described below. A first problem stems from the resolving power of the display screen that corresponds to a gap between the two neighboring dots to be described. For instance, a point of intersection calculated from two linear equations does not come into correct agreement with a point of intersection of a straight line formed by dots produced on the display screen. With the conventional system in which a point of intersection of a given straight line and a frame of the drawing region is calculated to find start points and end points of segments to be drawn, therefore, if it becomes necessary to change a relationship of superposition of windows in order to display a figure in addition to portions that have hitherto been concealed in a window, the boundary becomes discrete between a portion of figure that has already been described and a portion of additional figure, producing a combined figure different from a figure to be obtained when they are described at one time. This becomes a serious problem in a multi-window type display system in which the figure is partly displayed, added or deleted frequently.
A second problem is concerned with a time required for judging the clipping. In the case of a circle or an ellipse that is often described, it is difficult to locally generate the dots based upon the calculation of points of intersection. Therefore, the dots are generated for the whole figure, and it is judged whether the dots are included in the regions to be described. Thus, if the clipping is judged for each dot, such an error of display does not develop as was the problem when a partial figure was additionally displayed as described above. However, as the structure of the region to be drawn becomes complex due to the superposition of windows, it also becomes difficult to judge the clipping for each dot. Therefore, the processing time is lengthened, and the drawing speed decreases.